#!/bin/bash
cd `dirname $0`
git checkout .
echo 'git pull'
git pull
projname="demo"
serverdir=${projname}-server
#编译客户端
cd ${projname}-web
yarn install -d
yarn build --dest ../${serverdir}/dist
cd ..
#构建egg服务端代码
cd ${serverdir}
npm run stop
rm -rf node_modules/
rm -rf yarn.lock
yarn install --production
npm run start
